Skip to content

Conversation

@Tanmay1201
Copy link
Contributor

@Tanmay1201 Tanmay1201 commented Mar 26, 2020

Fixes #120

Description

Added unit test cases for the component LicenseDropdown.vue using Jest

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the master branch of the repository.
  • My commit messages follow best practices.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@Tanmay1201 Tanmay1201 requested review from a team March 26, 2020 14:22
Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start, @Tanmay1201 !
I have left some comments on styling and writing the tests. Also, you might find this article helpful, it really helped me understand what tests I should write and how should I write them.

@@ -1,67 +1,69 @@
<template>
<b-field class="license-dropdown">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that your editor is applying some styling changes that are incompatible with the style of this repo. Could you please run a linter before committing files? (npm run-script lint)

});
});

it("Has the field tag", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing multiple markup features (field tag, option tag, etc) it is better to use snapshot testing, because it checks for multiple features in one test.

expect(wrapper.emitted().input).toBeTruthy();
});

it("Checks whether select element is getting triggered", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't seem to test anything.

@obulat
Copy link
Contributor

obulat commented May 21, 2020

@Tanmay1201 What is the status of this PR? If you can't work on it anymore, I will close it.

@Tanmay1201
Copy link
Contributor Author

@Tanmay1201 What is the status of this PR? If you can't work on it anymore, I will close it.

Hey @obulat , I have resumed working on this again, and will resolve it ASAP

@akmadian
Copy link
Member

akmadian commented Oct 6, 2020

Hey @Tanmay1201, are you still interested in working on this?

@obulat
Copy link
Contributor

obulat commented Oct 21, 2020

I am closing this PR due to lack of activity. If you want to start working on it again, please don't hesitate to reopen, @Tanmay1201

@obulat obulat closed this Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit and e2e tests for the LicenseDropdown component

3 participants